package tutorial.io;

import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;

import Util.StdOut;

public class ScanXan {

    public static void main(String[] args) {
        Scanner scanner = null;
        try {
            scanner = new Scanner(new File("src/tutorial/io/xanadu.txt"));
            scanner.useDelimiter(",\\s*");
            while(scanner.hasNext()) {
                StdOut.println(scanner.next());
            }
        } catch (FileNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } finally {
            if (scanner != null) {
                scanner.close();
            }
        }
    }
}
